Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Python 3 #19

Merged
merged 4 commits into from
Aug 26, 2017
Merged

Support Python 3 #19

merged 4 commits into from
Aug 26, 2017

Conversation

Dessix
Copy link
Contributor

@Dessix Dessix commented Aug 7, 2017

Fixes compatibility with Python 3 to allow it to properly behave as Python 2 does.

Requires completion of Python Screeps PR #22 to function on Python 3.

Dessix added 4 commits August 6, 2017 22:33
Requirements.txt now includes the newer websocket and requests versions for use
with the api code.
# If we lose the connection to the remote system close the console.
if data.startswith('### closed ###'):
if data.startswith(b'### closed ###'):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the point of turning these into "bytes" instead of just strings? You do it in some other areas as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data is a byte array, in Python 3. startswith will throw on mismatched types.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that makes sense.

@tedivm tedivm merged commit b63ba28 into screepers:master Aug 26, 2017
@Dessix Dessix deleted the python3 branch August 26, 2017 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants